package com.ws.rs;

import java.util.List;

import javax.annotation.Resource;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import org.springframework.stereotype.Component;

import com.ws.model.People;
import com.ws.persistence.PeopleMapper;

@Component("peopleRService")
@Path("/people")
public class PeopleRService {
	
	@Resource
	private PeopleMapper peopleMapper;
	
	@GET
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/get")
	public List<People> getListByIdCard(@QueryParam("idCard") String idCard){
 		return peopleMapper.getListByIdCard(idCard);
	}
}
